<!-- 令牌购买 -->
<template>
    <div class="pag"><!-- :class="{'adjust-height': choose > 0}"-->
        <div class="pledge-banner">
            <img src="~assets/images/yta/banner2.png" alt="">
        </div>
        <div class="yta-address">
            <div class="input-wrapper">
                <input @focus="inputFocus" placeholder="输入您用来接收YTA的地址" type="text" v-model="ytaAddress" />
                <span @click="noCopyNotice" v-if="!isAble">复制</span>
                <span v-if="isAble" @click="copyNotice" class="clipboard-btn" :data-clipboard-text="ytaAddress">复制</span>
            </div>
            <div @click="openPayModal" class="yta-btn edit-yta-btn" :class="{'edit-btn': isAble}">绑定</div>
        </div>
        <div class="bottom-footer">
            <p>如果您还没有接收YTA的地址</p>
            <p>可点击下面链接获取钱包地址</p>
            <h3 @click="goDownload">下载BitKeep</h3>
        </div>
        <div class="mask" v-show="showMask" @click="closeMask($event)" @touchmove.prevent>
          <div ref="maskContent">
            <transition name="fade">
              <div class="general-height pay-password" v-if="showPay">
                <div class="password-wrapper">
                  <span><strong v-if="password.num1 >= 0"></strong></span>
                  <span><strong v-if="password.num2 >= 0"></strong></span>
                  <span><strong v-if="password.num3 >= 0"></strong></span>
                  <span><strong v-if="password.num4 >= 0"></strong></span>
                  <span><strong v-if="password.num5 >= 0"></strong></span>
                  <span><strong v-if="password.num6 >= 0"></strong></span>
                </div>
                <!--<div class="forget-password" @click="getPwd">忘记密码?</div>-->
                <div class="number-group">
                  <div class="number-btn">
                    <div @click.stop.prevent="chooseNum(1)">1</div><div @click.stop.prevent="chooseNum(2)">2</div><div @click.stop.prevent="chooseNum(3)">3</div>
                  </div>
                  <div class="number-btn">
                    <div @click.stop.prevent="chooseNum(4)">4</div><div @click.stop.prevent="chooseNum(5)">5</div><div @click.stop.prevent="chooseNum(6)">6</div>
                  </div>
                  <div class="number-btn">
                    <div @click.stop.prevent="chooseNum(7)">7</div><div @click.stop.prevent="chooseNum(8)">8</div><div @click.stop.prevent="chooseNum(9)">9</div>
                  </div>
                  <div class="number-btn">
                    <div class="no-num"></div><div @click.stop.prevent="chooseNum(0)">0</div><div class="no-num" @click.stop.prevent="deletePwd"><img src="~assets/images/del.png" /></div>
                  </div>
                </div>
                <div class="pay-loading" v-show="showPayLoading">
                  <div class="paying">
                    <img src="~assets/images/paying.gif" />
                    <span>正在支付</span>
                  </div>
                </div>
              </div>
            </transition>
          </div>
        </div>
    </div>
</template>

<script>
  import bridge from 'common/js/bridge'
  import md5 from 'js-md5';
  /*import 'common/js/gt';*/
  import {ytaAddressUpdate,checkAgentPayPassword } from 'api/register'

  export default {
    data() {
      return {
        ytaAddress: '',
        isAble: false,
        isEdit: 0,
        u: '',
        showMask: false,
        showPay: false,
        showPayLoading: false,
        scene: 'yta',
        payPassword: '',
        payPwd: '',
        password: {
          num1: -1,
          num2: -1,
          num3: -1,
          num4: -1,
          num5: -1,
          num6: -1
        }
      }
    },
    beforeRouteEnter (to, from, next) {
      next((vm) => {
        let query = to.query;
        Object.assign(vm, query);
        vm.uid = query.uid;
        vm.token = query.token;
        /*vm.pledgeTotal = 0;
        vm.nonPledgeTotal = 0;
        vm.choose = 0;*/
        /*vm.page = 1;
        vm.sw = true;
        vm.options.pullUpLoad = true;*/
        vm.setNormalStatus();
        /*vm.getMiningInfo();
        vm.getNodeList();*/
      })
    },
    mounted() {

    },
    watch: {
      'password.num6': {
        handler(newVal, oldVal) {
          if (newVal >= 0 && this.payPwd.length == 6) {
            // console.log(this.payPwd);
            this.payPassword = md5(this.payPwd);
            // console.log(this.payPassword);
            setTimeout(() => {
              this.verifyPayPassword();
            }, 50);
          }
        },
        immediate: true,
        deep: true
      },
      ytaAddress() {
        this.inputFocus();
      }
    },
    beforeDestroy() {

    },
    methods: {
      setNormalStatus() {


      },
      inputFocus() {
        // let adrReg = /^(0x)?[0-9a-fA-F]{24,55}$/;
        /*if (this.ytaAddress != '' && this.ytaAddress.length >= 24 && this.ytaAddress.length <= 55) {
          this.isAble = true;
        } else {
          this.isAble = false;
        }*/
        let adrReg = /[1-5a-z]{12}/;
        console.log(adrReg.test(this.ytaAddress));
        if (this.ytaAddress != '' && this.ytaAddress.length == 12 && adrReg.test(this.ytaAddress)) {
          this.isAble = true;
        } else {
          this.isAble = false;
        }
      },
      openPayModal() {
        /*let adrReg = /^[a-z1-5]*$/g;*/
        let adrReg = /[1-5a-z]{12}/;

        if (this.ytaAddress == '') {
          this.showToast('请输入要绑定的YTA地址！', 'warn');
          return;
        }
        if (this.ytaAddress != '') {
          if (this.ytaAddress.length != 12) {
            this.showToast('YTA地址不正确，请修改！', 'warn');
            return;
          }
          if (!adrReg.test(this.ytaAddress)) {
            console.log(adrReg.test(this.ytaAddress));
            this.showToast('YTA地址不正确，请修改！', 'warn');
            return;
          }
        }
        this.showMask = true;
        this.showPay = true;
      },
      verifyPayPassword() {
        this.showPayLoading = true;
        checkAgentPayPassword({uid: '', password: this.payPassword,  scene: this.scene}).then((data) => {
          // console.log(data);
          if (data.status && data.status == 1) {
            this.u = data.data.u;
            setTimeout(() => {
              this.showPayLoading = false;
              this.showPay = false;
              this.confirmUpdate();
            }, 500);
          /*if (this.need_code == 1) {
            setTimeout(() => {
              this.showPayLoading = false;
            this.showPay = false;
            this.showIdCheck = true;
            /!*this.showMask = false;
            *!/
          }, 500);
          } else if (this.need_code == 0) {
            setTimeout(() => {
              this.showPayLoading = false;
            this.showPay = false;
            if (this.current == 1) {
              this.finishVerification();
            } else if (this.current == 2) {
              this.finishVerificationOutside();
            }
          }, 500);

          }*/
          /*setTimeout(() => {
            const toast = this.$createToast({
              time: 1000,
              txt: '支付密码验证成功',
              type: 'correct'
            });
            toast.show();
          }, 300);*/

        }
      }).catch((error) => {
          // console.log(error);
          if (error.status && error.status != 1) {
              setTimeout(() => {
                this.showToast(error.info, 'warn');
              }, 500)
          }
          setTimeout(() => {
              this.showPayLoading = false;
          }, 500)
      })
        /*验证支付密码成功或者失败后将当前已经输入的支付密码清空*/
        this.password = {
          num1: -1,
          num2: -1,
          num3: -1,
          num4: -1,
          num5: -1,
          num6: -1
        };
        this.payPwd = '';
        this.payPassword = '';
      },
      confirmUpdate() {
        if (this.isSubmiting) {
          return;
        }

        this.isSubmiting = true;
        ytaAddressUpdate(this.ytaAddress, this.u).then((data) => {
          // console.log(data);
          this.isSubmiting = false;
          this.showMask = false;
          this.showToast('YTA新地址绑定成功！', 'success');

          setTimeout(() => {
            this.$router.push({path: '/ytaExchange', query: {
              uid: this.uid || localStorage.getItem('uid'),
              token: this.token || localStorage.getItem('token'),
              address: this.ytaAddress,
              active: 0
            }});
          }, 500)

        }).catch((err) => {
            this.isSubmiting = false;
            this.showMask = false;
            this.showToast(err.info, 'warn');
        })
      },
      chooseNum(val) {
        // console.log(this.payPwd.length);
        if (this.payPwd.length == 0) {
          this.password.num1 = val;
          this.payPwd += val;
        } else if (this.payPwd.length == 1) {
          this.password.num2 = val;
          this.payPwd += val;
        } else if (this.payPwd.length == 2) {
          this.password.num3 = val;
          this.payPwd += val;
        } else if (this.payPwd.length == 3) {
          this.password.num4 = val;
          this.payPwd += val;
        } else if (this.payPwd.length == 4) {
          this.password.num5 = val;
          this.payPwd += val;
        } else if (this.payPwd.length == 5) {
          this.password.num6 = val;
          this.payPwd += val;
        }
        // console.log(this.payPwd);
      },
      deletePwd() {
        // console.log(this.payPwd.length);
        if (this.payPwd.length == 0) {
          return;
        } else if (this.payPwd.length == 1) {
          this.password.num1 = -1;
          this.payPwd = '';
        } else if (this.payPwd.length == 2) {
          this.password.num2 = -1;
          this.payPwd = this.payPwd.substring(0, this.payPwd.length - 1)
        } else if (this.payPwd.length == 3) {
          this.password.num3 = -1;
          this.payPwd = this.payPwd.substring(0, this.payPwd.length - 1)
        } else if (this.payPwd.length == 4) {
          this.password.num4 = -1;
          this.payPwd = this.payPwd.substring(0, this.payPwd.length - 1)
        } else if (this.payPwd.length == 5) {
          this.password.num5 = -1;
          this.payPwd = this.payPwd.substring(0, this.payPwd.length - 1)
        } else if (this.payPwd.length == 6) {
          this.password.num6 = -1;
          this.payPwd = this.payPwd.substring(0, this.payPwd.length - 1)
        }
        // console.log(this.payPwd);
      },
      goDownload() {
        let href = 'https://bitkeep.com/down.html?from=android';
        /*let href = 'http://www.hao123.com';*/
        try {
          bridge.openBrowser(href);
        } catch(e) {
          window.location.href = href;
        }
        /*this.$router.push({path: '/linuxMiner', query: {

        }});*/
      },
      closeMask(ev) {
        if (!this.$refs.maskContent.contains(ev.target)) {
          this.showMask = false;
          this.showPay = false;

          /*关闭弹框时将当前已经输入的支付密码清空*/
          this.password = {
            num1: -1,
            num2: -1,
            num3: -1,
            num4: -1,
            num5: -1,
            num6: -1
          };
          this.payPwd = '';
          this.payPassword = '';

          /*if (this.payStatus == 2) {
            this.payStatus = 1;  //  payStatus:1,表示当前处于选择不同会员经销商，payStatus:2，表示当前处于支付弹框状态
            this.showPay = false;
          }*/
        }


      },
      noCopyNotice() {
        if (this.ytaAddress == '') {
          this.showToast('请输入要绑定的YTA新地址后再复制！', 'warn');
          return;
        }
      },
      copyNotice() {
        this.showToast('YTA地址复制成功！', 'success');
      },
      goProfitDetail() {
        this.$router.push({path: '/profitDetail', query: {
          /*availableCvnt: this.availableCvnt,
           pledgeCvnt: this.router.pledgeCvnt*/
        }});
      },
      backToTop() {
        this.$refs.scroll.scrollTo(0,0,2000);
      },
      pageScroll({y}) {
        if(y < -380){
          this.showBackTop = true
        }else{
          this.showBackTop = false
        }
      },
      showExplain() {
        this.activeImg = require('assets/images/newMining/explain.png');
        this.showAds = true;
      },
      closeActive() {
        this.showAds = false;
      },
      closeWarn() {
        this.showWarn = false;
      },
      showToast(msg, type) {
        const toast = this.$createToast({
          time: 2000,
          txt: msg,
          type: type
        });
        toast.show();
      }
    }
  }
</script>

<style lang="scss" scoped>
  .pag {
    position:relative;
    background: #FFF;
    height: 100%;
    font-size:30px;
    overflow-x: hidden;
    overflow-y: hidden;
  }
  .adjust-height{
    position:relative;
    bottom:144px;
  }
  .pledge-banner {
    width:750px;
    height:289px;
    /*background:linear-gradient(-4deg,rgba(70,89,255,1),rgba(69,110,255,1));*/
    /*border-radius:14px 14px 0 0;*/
    /*margin: 34px 30px 0 30px;*/
    margin: 0;
    /*padding-top: 47px;*/
    img{
      width:100%;
      height:auto;
    }
    h3 {
      /*padding-right: 68px;*/
      font-size:36px;
      font-weight:600;
      color:rgba(255,255,255,1);
      text-shadow:0 2px 4px rgba(0,89,240,0.5);
      margin-bottom: 16px;
      text-align: center;
      white-space:nowrap;
      strong{
        font-weight:600;
        color:#FCDFAD;
      }
      span{
        display:inline-block;
        width:100px;
        height:1px;
        background:#C3CAEA;
        vertical-align:middle;
      }
      .left{
        margin-right:18px;
      }
      .right{
        margin-left:18px
      }
    }
  }
  .yta-address{
    margin:120px 60px 0;
    .input-wrapper{
      position:relative;
      margin-bottom:50px;
      /*padding:10px 0;*/
      height:70px;
      border-bottom:1px solid #F5F5F5;
      input{
        width:calc(100% - 133px);
        height:100%;
        display:inline-block;
        /*text-indent:70px;*/
      }
      span{
        position:absolute;
        right:15px;
        bottom:10px;
        display:inline-block;
        width:116px;
        height:50px;
        line-height:50px;
        border-radius:8px;
        text-align:center;
        font-size:26px;
        color:#A1A1A1;
        background:#f7f7f7;
      }
      .clipboard-btn{
        color:#7D61FF;
      }
    }
    .yta-btn{
      width:100%;
      height:74px;
      line-height:74px;
      border-radius:37px;
      text-align:center;
      font-size:30px;
      cursor:pointer;
      background:rgba(70,99,255,0.1);
      color:#a1a1a1;
    }
    .edit-yta-btn{
      background:rgba(146,113,254,0.1);
    }
    .able-btn{
      background:rgba(70,99,255,1);
      color:#fff;
    }
    .edit-btn{
      background:rgba(146,113,254,1);
      color:#fff;
    }
  }
  .bottom-footer{
    width:100%;
    height:150px;
    margin-top:395px;
    /*margin-top:calc(100vh - 833px);*/

    text-align:center;
    p{
      line-height:1.35;
      font-size:26px;
      color:#999;
    }
    h3{
      margin-top:40px;
      font-size:26px;
      color:#485AFF;
      font-weight:bold;
    }
  }









  .pledge-banner-content {
    width:360px;
    height:138px;
    background:rgba(255,255,255,.2);
    border-radius:10px;
    margin-right: 64px;
    margin-left: auto;
    text-align: center;
    padding-top: 16px;
    font-size: 26px;
    color: #fff;
    div {
      margin-bottom: 16px;
      i {
        padding: 0 5px;
        font-style: normal;
      }
    }
  }



  .router-pledge {
    width:100%;
    height:254px;
    background: url("~assets/images/newMining/banner.png") 0 0 no-repeat;
    background-size: cover;
    /*background: url("~assets/images/token/router.png") 24px center / 174px 174px no-repeat,
    linear-gradient(210deg,rgba(73,189,250,1) 0%,rgba(43,117,243,1) 100%);*/
  }


  .token-types {
    height: 104px;
    background: #fff;
    font-size:30px;
    color:rgba(29,40,88,1);
    display: flex;
    align-items: center;
    justify-content: center;
    img {
      width: 58px;
      height: 58px;
      margin-right: 12px;
    }
    span {
      margin-right: 38px;
    }
  }






  .scroll-area{
    /*height:calc(100% - 370px);*/
    padding-top:24px;
    background:rgba(255,255,255,1);
    >h4{
      margin-top:19px;
      margin-bottom:24px;
      padding-left:30px;
      font-size:20px;
      color:#71768C;
    }
    .tab-area{
      display:flex;
      justify-content:space-between;
      align-items:center;
      /*margin-top:24px;*/
      padding:0 30px;

      .tab-info{
        font-size:34px;
        color:#202C5B;
        span{
          display:inline-block;
          width:6px;
          /*height:36px;*/
          margin-right:15px;
          background:rgba(43,117,243,1);
        }
        img{
          display:inline-block;
          width:36px;
          height:36px;
          margin-left:23px;
          vertical-align:bottom;
        }
      }
      .tab-btn{
        width:360px;
        height:72px;
        line-height:72px;
        border-radius:10px 10px 0 0;
        background:#E5E5E9;
        span{
          display:inline-block;
          width:49.99999%;
          height:100%;
          text-align:center;
          font-size:30px;
          color:#838899;
          cursor:pointer;
        }
        .selected{
          color:#1D2858;
          background:rgba(255,255,255,1);
          border-radius:10px 10px 0 0;
        }
      }
    }

  }

  .code-content{
    background:#fff;
    /*height:calc(100% - 46px);*/
    .code-title{
      padding:27px 30px;
      border-top:1px solid #F5F5F5;
      font-size:22px;
      color:#202C5B;
      div{
        display:inline-block;
        text-align:center;
      }
      div:first-child{
        width:3.99999%;
      }
      div:nth-child(2){
        width:11.99999%;
      }
      div:nth-child(3){
        width:19.99999%;
      }
      div:nth-child(4){
        width:19.99999%;
      }
      div:nth-child(5){
        width:7.99999%;
      }
      div:nth-child(6){
        width:15.99999%;
      }
      div:last-child{
        width:19.99999%;
        text-align:right;
      }
    }
    .chip-info{
      display:flex;
      padding:7px 46px 7px 50px;
      justify-content:space-between;
      align-items:center;
      border-bottom:1px solid #f5f5f5;
      p{
        /*flex:1;*/
        display:flex;
        align-items:center;
        font-size:26px;
        color:#1D2858;
        img{
          width:58px;
          height:58px;
          margin-right:12px;
        }
      }
      /*p:last-child{
        margin-left:auto;
      }*/
    }
    .no-result-wrapper{
      position:relative;
      height:calc(100vh - 570px);
      h2{
        /*padding:12px 0;*/
        position:absolute;
        width:250px;
        height:330px;
        top:-48px;
        bottom:0;
        left:0;
        right:0;
        margin:auto;
        text-align:center;
        color: #838899;
        font-size:26px;
        img{
          display:block;
          margin:0 auto 20px;
          width:250px;
          height:274px;
        }
      }
    }

  }
  .fregment{
    min-height:calc(100vh - 570px);
  }
  .scroll-list-wrap{
    /*height:100%;*/
    background:#F5F5FB;
    padding-top:8px;
    padding-bottom:1px;
  }
  .code-item{
    width:100%;;
    margin:1px 0 8px;
    background:#FFF;
    /*padding: 12px 0 32px;*/
    /*padding: 32px 0 32px;*/
    /*box-shadow:0 0 6px 0 rgba(102,102,102,0.3);
    border-radius:14px;*/
    .title{
      display:flex;
      justify-content:space-between;
      align-items:center;
      span{
        width:270px;
        padding:2px 21px 3px 13px;
        background:rgba(23,62,143,0.4);
        border-radius:0 14px 14px 0;
        font-size:24px;
        color:rgba(255,255,255,1);
      }
      i{
        margin-right:74px;
        font-style:normal;
      }
      strong{
        display:inline-block;
        padding:14px 46px 13px;
        background:rgba(23,62,143,1);
        border-radius:10px 0 0 10px;
        font-size:26px;
        color:rgba(255,255,255,1);
        cursor:pointer;
      }
    }
    .detail{
      display:flex;
      /*margin-top:32px;*/
      justify-content:space-between;
      align-items:center;
      padding:19px 24px 19px 24px;
      .token{
        display:flex;
        width:100%;
        align-items:center;
        text-align:center;
        .check-box{
          width:6%;
          text-align:left;
          img{
            width:35px;
            height:35px;
          }
        }
        .serial-num{
          width:11%;
          p{
            font-size:26px;
            font-weight:400;
            color:rgba(32,44,91,1);
            img{
              width:32px;
              height:28px;
            }
          }
        }
        .name{
          width:25%;
          text-align:left;
          p{
            margin-bottom:16px;
            height:35px;
            font-size:24px;
            font-weight:600;
            color:rgba(32,44,91,1);
            white-space:nowrap;
            text-overflow:ellipsis;
            overflow:hidden;
          }
          .status{
            width:70px;
            height:30px;
          }
          .storage{
            width:22px;
            height:30px;
            margin-left:8px;
          }
        }
        .flow{
          width:18%;
          font-size:24px;
          font-weight:400;
          color:rgba(32,44,91,1);
        }
        .online-time{
          width:10%;
          font-size:24px;
          font-weight:600;
        }
        .mining-way{
          width:20%;
          p{
            margin-bottom:18px;
            font-size:24px;
            white-space:nowrap;
          }
          h4{
            font-size:20px;
          }
        }
        .action{
          width:20%;
          text-align:right;
          .btn{
            width:110px;
            height:48px;
            line-height:48px;
            border-radius:8px;
            margin-left:auto;
            font-size:22px;
            text-align:center;
          }
          .unable-btn{
            border:1px solid rgba(153,153,153,1);
            color:rgba(153,153,153,1);
          }
          .able-btn{
            border:1px solid rgba(43,117,243,1);
            color:#2B75F3;
          }
          .warning-btn{
            border:1px solid rgba(243,109,43,1);
            color:#F36D2B;
          }
          .token-pledge{
            width:120px;
            white-space:nowrap;
            border:1px solid #00a989;
            color:#00a989;
          }
          .text{
            margin-bottom:18px;
            text-align:center;
            color:#202C5B;
            font-size:22px;
          }
          h4{
            text-align:center;
            color:#202C5B;
            font-size:20px;
          }
        }
      }

    }
    .progress-bar{
      .success{
        width:100%;
        height:4px;
        background:rgba(16,213,146,1);
      }
      .failure{
        height:4px;
        background:#EB3257;
      }
    }
    .chip-detail{
      .chip-content{
        border-top:1px solid #F5F5F5;
        h4{
          display:flex;
          align-items:center;
          justify-content:space-between;
          margin:0 24px;
          padding:14px 24px;
          border-bottom:1px solid #F5F5F5;
          strong{
            flex:1;
            display:inline-block;
            max-width:340px;
            height:35px;
            line-height:35px;
            white-space:nowrap;
            overflow:hidden;
            text-overflow:ellipsis;
            font-size:26px;
            color:#202C5B;
          }
          img{
            width:74px;
            height:74px;
            margin-right:80px;
          }
          span{
            display:inline-block;
            padding:12px 0;
            font-size:26px;
            color:#DC0630;
            cursor:pointer;
          }
        }
      }
    }
  }
  .add-margin-bottom{
    margin-bottom:144px;
  }

  .mask{
    position:fixed;
    z-index:9991;
    height:100%;
    width:100%;
    top:0;
    bottom:0;
    left:0;
    right:0;
    background:rgba(0, 0, 0, 0.5);

    .general-height{
      /*height: 500px;*/
      height: 67.46vh;
      background:rgba(255,255,255,1);
    }
    .special-height{
      height: 55.46vh!important;
      background:rgba(255,255,255,1);
    }
    .title{
      position:relative;
      padding:29px 0 28px;
      font-size:34px;
      border-bottom:1px solid rgba(245,245,245,1);
      color:#202C5B;
      text-align:center;
      img{
        position:absolute;
        left:30px;
        top:27px;
        width:20px;
        height:34px;
      }
    }
    .number-group{
      position:absolute;
      z-index:9992;
      bottom:0;
      left:0;
      right:0;
      height:448px;
      >div:first-child{
        border-top:1px solid rgba(245,245,245,1);
      }
      .number-btn{
        display:flex;
        div{
          flex:1;
          height:111px;
          line-height:111px;
          font-size:50px;
          color:#333;
          text-align:center;
          border-bottom:1px solid rgba(245,245,245,1);
          border-right:1px solid rgba(245,245,245,1);
          -webkit-tap-highlight-color:rgba(0,0,0,0.15);
        }
        div:active{
          background:rgba(0,0,0,0.15);
        }
        div:last-child{
          border-right:none;
        }
        .no-num{
          background:#e3e7ee;
          img{
            width:44px;
            height:32px;
            display:block;
            margin:40px auto;
          }
        }
      }
    }
    .shopping-detail{
      position:fixed;
      width:100%;
      bottom:0;
      left:0;
      right:0;

      .content{
        margin:97px 30px 0;
        h2{
          margin-bottom:66px;
          text-align:center;
          font-size:30px;
          color:#202C5B;
          font-weight:600;
          span{
            font-size:72px;
          }
        }
        p{
          display:flex;
          justify-content:space-between;
          font-size:28px;
          padding-bottom:29px;
          border-bottom:1px solid #ececec;
          span{
            color:#71768C;
          }
          strong{
            color:#202C5B;
          }
          input{
            width:250px;
            height:84px;
            text-indent:15px;
            background:rgba(248,248,248,1);
            border:1px solid rgba(23,62,143,1);
            border-radius:6px;
          }
        }
        p:last-child{
          margin-top:30px;
        }
        h4{
          font-size:28px;
          line-height:1.55;
          /*text-align:center;*/
          color:#71768C;
          span{
            color:#EB3257;
          }
        }
      }
      .confirm-content{
        margin:32px 30px 0;
        h1{
          margin-bottom:65px;
          font-size:28px;
          color:#71768C;
          text-align:center;
          span{
            color:#EB3257;
          }
        }
        .number{
          margin-top:30px;
        }
        .notice{
          margin-top:25px;
          font-size:26px;
          color:rgba(32,44,91,1);
          text-align:center;
          img{
            width:34px;
            height:34px;
            vertical-align:sub;
            margin-right:15px;
          }
        }
      }
      .official-content{
        p{
          padding-bottom:52px;
          align-items:center;
          /*border-bottom:none;*/
        }
        .warn{
          padding:0 30px;
          line-height:1.65;
          font-size:24px;
        }
      }
      .result{
        /*margin-top:97px;*/
        margin-top:45px;
        text-align:center;
        img{
          width:80px;
          height:80px;
          margin-bottom:41px;
        }
        h3{
          margin-bottom:20px;
          font-size:28px;
          color:#202C5B;
          span{
            font-size:72px;
          }
        }
        p{
          font-size:24px;
          color:#71768C;
        }
      }
      .pay-btn{
        position:absolute;
        bottom:30px;
        height:84px;
        line-height:84px;
        text-align:center;
        border-radius:8px;
        color:#fff;
        width:calc(100% - 60px);
        margin:0 30px;
        font-size:34px;
        p{
          display: inline-block;
          width:48%;
          margin-right:3.99999%;
          border-radius:8px;
          background:rgba(23,62,143,1);
        }
        p:last-child{
          margin-right:0;
        }
      }
    }
    .pay-password{
      position:fixed;
      width:100%;
      bottom:0;
      left:0;
      right:0;
      .password-wrapper{
        display:flex;
        margin:43px 30px 0;
        height:88px;
        line-height:88px;
        border:1px solid rgba(209,209,209,1);
        border-radius:10px;
        span{
          flex:1;
          text-align:center;
          border-right:1px solid rgba(209,209,209,1);
          strong{
            display:block;
            width:20px;
            height:20px;
            border-radius:50%;
            background:#333;
            margin:34px auto;
          }
        }
        span:last-child{
          border-right:none;
        }
      }
      .forget-password{
        color:#1253FC;
        width:25%;
        padding:12px 0;
        margin:12px auto 0;
        text-align:center;
        font-size:28px;
      }
      .pay-loading{
        position:absolute;
        z-index:9993;
        bottom:0;
        left:0;
        right:0;
        height:calc(100% - 70px);
        background:#fff;
        .paying{
          position:absolute;
          left:50%;
          top:50%;
          transform:translate(-50%, -50%);
          text-align:center;
          font-size:30px;
          color:#4B74E8;
          img{
            display:block;
            width:40px;
            height:40px;
            margin:0 auto 15px;
          }
        }
      }

    }
    .id-check{
      position:fixed;
      width:100%;
      bottom:0;
      left:0;
      right:0;
      .check-title{
        position:relative;
        img{
          position:absolute;
          left:30px;
          top:29px;
          width:34px;
          height:34px;
        }
      }
      .check-content{
        margin-top:32px;
        padding:0 30px;
        p{
          text-align:center;
          color:#202C5B;
          font-size:26px;
          line-height:1.5;
        }
        .sms-input{
          height:84px;
          line-height:84px;
          margin-top:28px;
          input{
            display:inline-block;
            height:84px;
            line-height:84px;
            width:59.9999%;
            text-indent:22px;
            font-size:30px;
            border-radius:10px 0 0 10px;
            border:1px solid rgba(227,227,227,1);
            border-right:none;
            box-shadow:0 0 0 rgba(0,0,0,0);
            -webkit-appearance:none;
            outline:none;
            background:#F6F7F8;
          }
          span{
            display:inline-block;
            width:39.9999%;
            height:84px;
            line-height:84px;
            border-radius:0 10px 10px 0;
            vertical-align:top;
            background:#D1D1D1;
            color:#fff;
            font-size:30px;
            text-align:center;
            /*border:1px solid rgba(227,227,227,1);
            border-left:none;*/
          }
        }
        .finish-btn{
          height:84px;
          line-height:84px;
          margin-top:32px;
          text-align:center;
          color:#fff;
          font-size:34px;
          border-radius:8px;
          background:rgba(23,62,143,0.5);
        }
        .success{
          background:rgba(23,62,143,1);
        }
      }
    }
    .adjust-bottom{
      bottom:-15px!important;
    }
  }






  .active-ct{
    position:relative;
    width:84.53333vw;
    /*height:auto;*/
    margin:0 auto;
    border-radius:14px;
    background:#fff;
    .content{
      /*background:#1E213C;*/
      /*margin:0 auto;*/

      /*width:92vw;*/

      /*height:105.33vw;*/
      padding:45px 16px 0;
      margin-bottom:22px;
      -webkit-overflow-scrolling: touch;
      /*overflow:auto;*/
      h2{
        margin-bottom:28px;
        color:#202C5B;
        text-align:center;
        font-size:32px;
      }
      p{
        padding:0 16px;
        color:#202C5B;
        font-size:30px;
        line-height:1.75;
      }
      .pledge{
        padding:0 45px;
      }
      h3{
        line-height:1.75;
        margin-top:-25px;
        margin-bottom:20px;
        /*border-top:1px solid #F1F2F7;*/
        padding-top:30px;
        padding-left:17px;
        font-size:30px;
        color:#71768C;
        span{
          color:#EB3257;
        }
      }
      h1{
        margin-bottom:25px;
        font-size:30px;
        font-weight:600;
        color:#202C5B;
      }
      /*img{
        display:block;
        width:100%;
        min-height:500px;
        height:auto;
        border-radius:6px;
      }*/
    }
    .img-explain{
      /*height:80vh;*/
      height:70vh;
      img{
        width:100%;
      }
    }
    .close{
      /*position:absolute;*/
      z-index:9999;
      width:100%;
      height:108px;
      line-height:108px;
      border-top:1px solid #D0D4E4;
      /*bottom:160px;*/
      /*margin-top:-390px;*/
      cursor:pointer;
      p{
        font-size:30px;
        color:#1253FC;
        text-align:center;
        /*img{
          width:42px;
          height:42px;
          margin-right:20px;
          vertical-align:middle;
        }*/
      }
      /*>img{
        width:70.2%;
      }*/
    }
    .upgrade-member {
      margin: 0 auto 35px;
      width: 634px;
      /*height: 481px;*/
      /*height: 380px;*/
      -webkit-overflow-scrolling: touch;
      overflow: auto;
      background:#fff;
      border-radius:14px;
      h2{
        margin:92px auto 36px;
        font-size:32px;
        text-align:center;
        color:#202C5B;
      }

      h3{
        margin:0 auto 80px;
        text-align:center;
        font-size:30px;
        line-height:1.5;
        color:#202C5B;
      }
      h4{
        font-size:13px;
        text-align:center;
      }
      .submit-btn{
        height:108px;
        line-height:108px;
        width:100%;
        font-size:0;
        margin:15px auto 0;
        border-top:1px solid #D0D4E4;
        text-align:center;
        span{
          display:inline-block;
          width:49.99999%;
          border-radius:5px;
          font-size:30px;
          color:#1253FC;
        }
        span:last-child{
          color:#1253FC;
          border-left:1px solid #D0D4E4;
          /*margin-right:10px;*/
        }
      }
    }
    .submit-btn{
      height:108px;
      line-height:108px;
      width:100%;
      font-size:0;
      margin:15px auto 0;
      border-top:1px solid #D0D4E4;
      text-align:center;
      span{
        display:inline-block;
        width:49.99999%;
        border-radius:5px;
        font-size:30px;
        color:#1253FC;
      }
      span:last-child{
        color:#1253FC;
        border-left:1px solid #D0D4E4;
        /*margin-right:10px;*/
      }
    }


  }

  .pledge-actions {
    z-index: 80;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    padding: 0 30px;
    justify-content: center;
    align-items: center;
    background: #F5F5FB;
    height: 144px;
    div {
      width:330px;
      height:84px;
      background:rgba(23,62,143,1);
      border-radius:10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size:32px;
      color:rgba(255,255,255,1);
      margin-right: 30px;
      &:last-of-type {
         margin-right: 0;
      }
    }
  }


  .backtop {

    position: fixed;
    right: 10px;
    bottom: 120px;
    z-index: 500;
    width: 66px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;

    img {
      width: 46px;
      height: 46px;
      display: block;
    }
  }

  /*.refresh-img-rotate{

    animation: img-Rotate 0.5s linear 1 forwards;
  }
  @keyframes img-Rotate {
    0%{
      transform-origin: 50% 50%;
      transform:rotate(0deg);
    }
    50%{
      transform-origin: 50% 50%;
      transform:rotate(90deg);
    }
    100%{
      transform-origin: 50% 50%;
      transform:rotate(180deg);
    }
  }*/

  .fixed-position{
    position:fixed;
  }
  .static-position{
    position:absolute;
  }

  .fade-enter-active, .fade-leave-active{
    /*opacity:1;
    background: rgba(7, 17, 27, 0.8);*/
    transition: all 0.5s;
    transform:translate(0, 0);
  }
  .fade-enter, .fade-leave-active{
    /*opacity:0;
    background:rgba(7, 17, 27, 0);*/
    transform: translate(0, 100%);
  }
  input::-webkit-input-placeholder{
    color: #a1a1a1;
    font-size:24px;
  }
</style>
<style>
  .cube-toast-tip{
    /*max-width:13em;*/
    font-size:28px;
    max-width:15.5em;
    max-height:6em;
    line-height:40px;
  }
  .cube-toast.cube-popup {
    z-index: 10000!important;
  }
</style>











